home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Standards
/
CD1.mdf
/
winsock
/
hacker
/
93-11
/
000005_rcq@ftp.com_Tue Nov 30 07:12:32 1993.msg
< prev
Wrap
Internet Message Format
|
1993-11-29
|
2KB
Received: from ftp.com (babyoil.ftp.com) by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.06) with SMTP
id AA12840; Tue, 30 Nov 1993 12:12:56 -0500
Received: from rcq.oysters.ftp.com by ftp.com via PCMAIL with DMSP
id AA22885; Tue, 30 Nov 93 12:12:32 -0500
Date: Tue, 30 Nov 93 12:12:32 -0500
Message-Id: <9311301712.AA22885@ftp.com>
To: paul@atlas.abccomp.oz.au
Subject: Re: Multiple connect()s with SOCK_DGRAM sockets?
From: rcq@ftp.com (Bob Quinn)
Reply-To: rcq@ftp.com
Cc: Multiple recipients of list <winsock-hackers@sunsite.unc.edu>
Sender: rcq@ftp.com
Repository: babyoil.ftp.com
Originating-Client: oysters.ftp.com
Hi Paul!
> What is the feeling of the community in allowing multiple connect() calls
> on SOCK_DGRAM sockets? I have several conflicting points either way:
...
> Since I've been informed more than once that the aim is "BSD compatibility",
> and if the Winsock spec differs from BSD behaviour, the BSD behaviour is what
> should be followed, I would like to propose some standard behaviour for
Agreed.
> 1) A connected SOCK_DGRAM socket can be "dis-connected" by calling
> connect() again with a destination 'name' consisting of address and
> port containing all zeros, and a valid family for the socket
> (i.e. "AF_INET / 0 / 0.0.0.0").
The address 0.0.0.0 is the value for INADDR_ANY which should cause
connect() to fail with WSAEDESTADDRREQ. What about using INADDR_NONE
instead?
> 2) A connected SOCK_DGRAM must be dis-connected using this method before
> it can be re-connected again, to the same or different destination
> address, otherwise an error code of WSAEISCONN will be returned
> (just like should happen now).
Why should you have to disconnect, it's not like there's a real
connection to close? All a UDP connect() does is change the foreign
IP Address and/or foreign port in the "association" (the 5-tuple of
Protocol, Local IP Addr, Local Port, Foreign IP Addr and Foreign Port).
I can't think of any reason why it should fail, as long as they
provide a valid foreign address (i.e. an address other than 0.0.0.0).
Regards,
--
Bob Quinn rcq@ftp.com
FTP Software, Inc. No. Andover, MA